<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>图书管理</title>
    <link rel="stylesheet" href="./static/css/index.css">
    <script src="/static/js/jquery-3.4.1.js"></script>
</head>
<body>
    <header class="header">
        <a href="/"><img src="./static/images/logo.png" class="logo" alt="logo"></a>
        
        <div class="btns">
            欢迎{{.UserName}}光临小小书城
            <a href="/showCart">购物车</a>
            <a href="/getMyOrders">我的订单</a>
            <a href="/logout">注销</a>
            <a href="/">返回</a>
        </div>

    </header>
    <div id="content">
        <table class="table">
            <tr>
                <th>订单号</th>
                <th>订单时间</th>
                <th>数量</th>
                <th>总金额</th>
                <th>详情</th>
                <th>操作</th>
            </tr>
            {{range .MyOrders}}
            <tr>
                <td>{{.OrderNo}}</td>
                <td>{{.OrderTime}}</td>
                <td>{{.TotalCount}}</td>
                <td>{{.TotalAmount}}</td>
                <td> <a href="/getOrderInfo?orderNo={{.OrderNo}}">查看详情</a> </td>
                <td>
                    {{if .HadSend}}
                    <a href="/receiveOrder?orderNo={{.OrderNo}}">确认收货</a>
                    {{end}}
                    {{if .NoSend}}
                    等待发货
                    {{end}}
                    {{if .Complete}}
                    已完成
                    {{end}}
                    
                </td>
            </tr>
            {{end}}
        </table>
        

    </div>
</body>
</html>